import types

clazzPathMap = {}
methodPathMap = {}

class Path(object):
    def __init__(self,uri):
        self.uri = uri;
    
    def __call__(self,target):
        typex = type(target)
        if typex == types.ClassType :
            return self.decorate_class(target)
        elif typex == types.TypeType:
            return self.decorate_class(target)
        elif typex == types.FunctionType:
            return self.decorate_function(target)
        else:
            print target,typex
    
    def decorate_class(self,target):
        clazzPathMap[target] = self.uri
        methodList = [getattr(target,method) for method in dir(target) if callable(getattr(target,method)) and not method.startswith("__")]
        
        return target
    
    def decorate_function(self,target):
        return target

@Path("/haha")
class Test(object):
    
    @Path("/hoho")
    def yyy(self):
        print "yyy"